﻿using System.Windows;
using System.Windows.Controls;

namespace LightningTools.BCSTesterMan.View
{
    /// <summary>
    /// Interaction logic for SimpleBcsView.xaml
    /// </summary>
    public partial class BcsView
    {
        public BcsView()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Called when Tree View Item is selected.
        /// NOTE: This is a hack to get the selected item in MVVM
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        private void OnItemSelected(object sender, RoutedEventArgs e)
        {
            EntityTreeView.Tag = ((TreeViewItem)e.OriginalSource).Header;
        }
    }
}